package com.supermap.dataservice.util;

import java.io.Serializable;
import java.util.List;

/**
 * @Author:langhongshuai
 * @Description:分页显示,向后台传递参数使用的model
 * @Date:18/8/6 下午5:37
 */
@SuppressWarnings("serial")
public class Table implements Serializable {

    private int code;//返回code
    private String msg;//返回信息
    private int count;//总条数
    private List data;//数据集合
    private int page = 1;//当前页
    private int limit = 30;//每页数量
    private String startTime;//开始时间
    private String endTime;//结束时间
    private int startPoint;//查询的起点
    private int starAppPoint;//查询app数据起点（仅供app分页使用）

    public void setStarAppPoint(int startAppPoint) {
        this.starAppPoint = startAppPoint;
    }

    public void setStartPoint(int startPoint) {
        this.startPoint = startPoint;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStartPoint() {

        int startpoint= this.getLimit()*(this.getPage() - 1);
        if(startpoint<0){
            startpoint = 0;
        }
        return startpoint;
    }

    public int getStarAppPoint() {
        return this.starAppPoint;
    }
}
